home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / SNIP9_91.ARJ / SCRNMACS.H < prev    next >
Text File  |  1991-08-07  |  1KB  |  28 lines

  1. /*
  2. **  Macros for managing direct video writes by Jerry Houston
  3. */
  4.  
  5. #if !defined(COLORMODE)
  6.  #define COLORMODE  ((*(char _far *)0x0449) != 7)
  7.  #define EXT_KBD    (*(char _far *)0x0496 & 16)
  8.  #define ROWSIZE    (*(int _far *)0x044A)
  9.  #define SCANLINES  ((int)*(char _far*)0x0461)
  10.  #define SCRBUFF    ((unsigned _far *)((COLORMODE)?0xB8000000:0xB0000000))
  11.  #define SCREENSEG  ((_segment)((COLORMODE)?0xB800:0xB000))
  12.  #define SCREENSIZE ((*(int _far *)0x044C) >> 1)
  13.  #define SCREENCOLS (*(int _far *)0x044A -1)
  14.  #define SCREENROWS ((*(char _far *)0x0484)?*(char _far*)0x0484:24)
  15. #endif
  16.  
  17. /*
  18.      COLORMODE  = true/false, are we using color?
  19.      EXT_KBD    = true/false, extended keyboard in use?
  20.      ROWSIZE    = number of characters on a row.
  21.      SCANLINES  = number of scan lines in a character.
  22.      SCRBUFF    = returns B800:0000 if using color, B000:0000 if mono.
  23.      SCREENSEG  = when you just need the segment portion.
  24.      SCREENSIZE = number of (2-byte) cells required to save screen.
  25.      SCREENCOLS = offset to the rightmost column, often 79.
  26.      SCREENROWS = offset to the bottom line, usually 24.
  27. */
  28.